From ae8f370c14acf1c326a5e0ab8c505414600ff3c0 Mon Sep 17 00:00:00 2001 From: David Vrabel Date: Mon, 22 Aug 2011 10:05:27 +0100 Subject: [PATCH] x86: use 'dom0_mem' to limit the number of pages for dom0 Use the 'dom0_mem' command line option to set the maximum number of pages for dom0. dom0 can use then use the XENMEM_maximum_reservation memory op to automatically find this limit and reduce the size of any page tables etc. Signed-off-by: David Vrabel --- xen/arch/x86/domain_build.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c index d7697e562b..f818f0b876 100644 --- a/xen/arch/x86/domain_build.c +++ b/xen/arch/x86/domain_build.c @@ -254,6 +254,8 @@ static unsigned long __init compute_dom0_nr_pages( } #endif + d->max_pages = min(max_pages, avail); + return nr_pages; } -- 2.30.2